﻿using Dapper_Core.Basic;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Dapper_Core.Table
{
    public class Sys_Dictionary : BaseModel
    {
        public Sys_Dictionary()
        {

        }

        [Key]
        /// <summary>
        /// 字典编码，主键必须加[Key]特性，若想对名为Id的列赋值必须加[Required]特性
        /// </summary>
        public string DictCode { get; set; }
        public string dictName;
        /// <summary>
        /// 字典名称
        /// </summary>
        public string DictName 
        {
            get { return dictName; }
            set
            {
                ToChanged("dictName", dictName, value);
                dictName = value;
            }
        }
        private string dictValue;
        /// <summary>
        /// 字典值
        /// </summary>
        public string DictValue 
        {
            get { return dictValue; }
            set
            {
                ToChanged("dictValue", dictValue, value);
                dictValue = value;
            }
        }
        private string dictType;
        /// <summary>
        /// 字典类型
        /// </summary>
        public string DictType 
        {
            get { return dictType; }
            set
            {
                ToChanged("dictType", dictType, value);
                dictType = value;
            }
        }
        private string orderNo;
        /// <summary>
        /// 排序编号
        /// </summary>
        public string OrderNo 
        {
            get { return orderNo; }
            set
            {
                ToChanged("orderNo", orderNo, value);
                orderNo = value;
            }
        }
        private string parentCode;
        /// <summary>
        /// 父节点Code
        /// </summary>
        public string ParentCode 
        {
            get { return parentCode; }
            set
            {
                ToChanged("parentCode", parentCode, value);
                parentCode = value;
            }
        }
        private int isActive;
        /// <summary>
        /// 是否有效（0无效、1有效）
        /// </summary>
        public int IsActive 
        {
            get { return isActive; }
            set
            {
                ToChanged("isActive", isActive, value);
                isActive = value;
            }
        }
    }
}
